<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button onclick="use()">ddd</button>
    


    <script>
        // let obj = new Object();
        // obj.name = "张三";
        // obj.age = 18 ;
        // obj.show = function(){
        //     alert("我的名字是:"+this.name+"年龄为:"+this.age)
        // }

        let user = {
            name:"张三",
            age:50,
            show:function(){
                "年龄"+age
            }
        }
        function use(){
            alert(user.show)
        }
    </script>
</body>
</html>